package com.junzhiit.nengji.cms.web.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.bainaeco.framework.util.AssertUtil;
import com.junzhiit.nengji.cms.service.MemberCardUseService;
import com.junzhiit.nengji.cms.web.vo.DataTablesParamVO;
import com.junzhiit.nengji.cms.web.vo.MemberCardUseVO;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/member/card/user")
public class MemberCardUseController extends BaseController{
	
	@Autowired
	private MemberCardUseService memberCardUseService;
	
	@ApiOperation(value = "获取会员卡权益使用流水列表")
	@RequestMapping(value="/all",method = RequestMethod.GET)
	public Map<String, Object> findAll(MemberCardUseVO memberCardUseVO,DataTablesParamVO dtp,String sessionId){
		AssertUtil.notNull(dtp.getStart(), "start is required.");
		AssertUtil.notNull(dtp.getLength(), "length is required.");
		AssertUtil.notBlank(sessionId, "sessionId is required.");
		return memberCardUseService.findAll(memberCardUseVO, dtp,sessionId);
	}
	
}
